home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / Windows / Interfaces / QD3DShader.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-03  |  22.3 KB  |  713 lines  |  [TEXT/MPS ]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        QD3DShader.h                                             **
  4.  **                                                                             **
  5.  **                                                                             **
  6.  **     Purpose:     QuickDraw 3D Shader / Color Routines                     **
  7.  **                                                                             **
  8.  **                                                                             **
  9.  **                                                                             **
  10.  **     Copyright (C) 1991-1995 Apple Computer, Inc. All rights reserved.     **
  11.  **                                                                             **
  12.  **                                                                             **
  13.  *****************************************************************************/
  14. #ifndef QD3DShader_h
  15. #define QD3DShader_h
  16.  
  17. #if defined(PRAGMA_ONCE) && PRAGMA_ONCE
  18.     #pragma once
  19. #endif
  20.  
  21. #if defined(THINK_C) || defined(__SC__)
  22.     #pragma options(!pack_enums, !align_arrays)
  23.     #pragma SC options align=power
  24. #elif defined(__MWERKS__)
  25.     #pragma enumsalwaysint on
  26.     #pragma align_array_members off
  27.     #pragma options align=native
  28. #elif defined(__PPCC__)
  29.     #pragma options align=power
  30. #elif defined(__xlc) || defined(__xlC) || defined(__xlC__) || defined(__XLC121__)
  31.     #pragma options enum=int
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif    /* __cplusplus */
  37.  
  38. /******************************************************************************
  39.  **                                                                             **
  40.  **                                RGB Color routines                             **
  41.  **                                                                             **
  42.  *****************************************************************************/
  43.  
  44. QD3D_EXPORT TQ3ColorRGB *Q3ColorRGB_Set(
  45.     TQ3ColorRGB            *color,
  46.     float                r,
  47.     float                g,
  48.     float                b);
  49.  
  50. QD3D_EXPORT TQ3ColorARGB *Q3ColorARGB_Set(
  51.     TQ3ColorARGB        *color,
  52.     float                a,
  53.     float                r,
  54.     float                g,
  55.     float                b);
  56.  
  57. QD3D_EXPORT TQ3ColorRGB *Q3ColorRGB_Add(
  58.     const TQ3ColorRGB     *c1, 
  59.     const TQ3ColorRGB     *c2,
  60.     TQ3ColorRGB            *result);
  61.  
  62. QD3D_EXPORT TQ3ColorRGB *Q3ColorRGB_Subtract(
  63.     const TQ3ColorRGB     *c1, 
  64.     const TQ3ColorRGB     *c2,
  65.     TQ3ColorRGB            *result);
  66.  
  67. QD3D_EXPORT TQ3ColorRGB *Q3ColorRGB_Scale(
  68.     const TQ3ColorRGB     *color, 
  69.     float                scale,
  70.     TQ3ColorRGB            *result);
  71.  
  72. QD3D_EXPORT TQ3ColorRGB *Q3ColorRGB_Clamp(
  73.     const TQ3ColorRGB     *color,
  74.     TQ3ColorRGB            *result);
  75.  
  76. QD3D_EXPORT TQ3ColorRGB *Q3ColorRGB_Lerp(
  77.     const TQ3ColorRGB     *first, 
  78.     const TQ3ColorRGB     *last, 
  79.     float                 alpha,
  80.     TQ3ColorRGB         *result);
  81.  
  82. QD3D_EXPORT TQ3ColorRGB *Q3ColorRGB_Accumulate(
  83.     const TQ3ColorRGB     *src, 
  84.     TQ3ColorRGB         *result);
  85.  
  86. QD3D_EXPORT float *Q3ColorRGB_Luminance(
  87.     const TQ3ColorRGB    *color, 
  88.     float                 *luminance);
  89.  
  90.  
  91. /******************************************************************************
  92.  **                                                                             **
  93.  **                                Shader Types                                 **
  94.  **                                                                             **
  95.  *****************************************************************************/
  96.  
  97. typedef enum TQ3ShaderUVBoundary {
  98.     kQ3ShaderUVBoundaryWrap,
  99.     kQ3ShaderUVBoundaryClamp
  100. } TQ3ShaderUVBoundary;
  101.  
  102.  
  103. /******************************************************************************
  104.  **                                                                             **
  105.  **                                Shader Routines                                 **
  106.  **                                                                             **
  107.  *****************************************************************************/
  108.  
  109. QD3D_EXPORT TQ3ObjectType Q3Shader_GetType(
  110.     TQ3ShaderObject            shader);
  111.  
  112. QD3D_EXPORT TQ3Status Q3Shader_Submit(
  113.     TQ3ShaderObject            shader, 
  114.     TQ3ViewObject            view);
  115.  
  116. QD3D_EXPORT TQ3Status Q3Shader_SetUVTransform(
  117.     TQ3ShaderObject            shader,
  118.     const TQ3Matrix3x3        *uvTransform);
  119.  
  120. QD3D_EXPORT TQ3Status Q3Shader_GetUVTransform(
  121.     TQ3ShaderObject            shader,
  122.     TQ3Matrix3x3            *uvTransform);
  123.  
  124. QD3D_EXPORT TQ3Status Q3Shader_SetUBoundary(
  125.     TQ3ShaderObject            shader,
  126.     TQ3ShaderUVBoundary        uBoundary);
  127.  
  128. QD3D_EXPORT TQ3Status Q3Shader_SetVBoundary(
  129.     TQ3ShaderObject            shader,
  130.     TQ3ShaderUVBoundary        vBoundary);
  131.  
  132. QD3D_EXPORT TQ3Status Q3Shader_GetUBoundary(
  133.     TQ3ShaderObject            shader,
  134.     TQ3ShaderUVBoundary        *uBoundary);
  135.  
  136. QD3D_EXPORT TQ3Status Q3Shader_GetVBoundary(
  137.     TQ3ShaderObject            shader,
  138.     TQ3ShaderUVBoundary        *vBoundary);
  139.  
  140.  
  141. /******************************************************************************
  142.  **                                                                             **
  143.  **                            Illumination Shader    Classes                         **
  144.  **                                                                             **
  145.  *****************************************************************************/
  146.  
  147. QD3D_EXPORT TQ3ObjectType Q3IlluminationShader_GetType(
  148.     TQ3ShaderObject                shader);
  149.  
  150. QD3D_EXPORT TQ3ShaderObject Q3PhongIllumination_New(
  151.     void);
  152.  
  153. QD3D_EXPORT TQ3ShaderObject Q3LambertIllumination_New(
  154.     void);
  155.  
  156. QD3D_EXPORT TQ3ShaderObject Q3NULLIllumination_New(
  157.     void);
  158.  
  159. /******************************************************************************
  160.  **                                                                             **
  161.  **                                 Surface Shader                                 **
  162.  **                                                                             **
  163.  *****************************************************************************/
  164.  
  165. QD3D_EXPORT TQ3ObjectType Q3SurfaceShader_GetType(
  166.     TQ3SurfaceShaderObject        shader);
  167.  
  168. /******************************************************************************
  169.  **                                                                             **
  170.  **        Texture Shader  - may use any type of Texture. (only 1 type in 1.0)     **
  171.  **                                                                             **
  172.  *****************************************************************************/
  173.  
  174. QD3D_EXPORT TQ3ShaderObject Q3TextureShader_New(
  175.     TQ3TextureObject            texture);
  176.  
  177. QD3D_EXPORT TQ3Status Q3TextureShader_GetTexture(
  178.     TQ3ShaderObject                shader,
  179.     TQ3TextureObject            *texture);
  180.  
  181. QD3D_EXPORT TQ3Status Q3TextureShader_SetTexture(
  182.     TQ3ShaderObject                shader,
  183.     TQ3TextureObject            texture);
  184.  
  185.  
  186. /******************************************************************************
  187.  **                                                                             **
  188.  **        Texture Objects - For 1.0, there  is 1 subclass: PixmapTexture.         **
  189.  **        More subclasses will be added in later releases.                     **
  190.  **            (e.g. PICTTexture, GIFTexture, MipMapTexture)                     **
  191.  **                                                                             **
  192.  *****************************************************************************/
  193.  
  194. QD3D_EXPORT TQ3ObjectType Q3Texture_GetType(
  195.     TQ3TextureObject        texture);
  196.  
  197. QD3D_EXPORT TQ3Status Q3Texture_GetWidth(
  198.     TQ3TextureObject        texture,
  199.     unsigned long            *width);
  200.  
  201. QD3D_EXPORT TQ3Status Q3Texture_GetHeight(
  202.     TQ3TextureObject        texture,
  203.     unsigned long            *height);
  204.  
  205.  
  206. /******************************************************************************
  207.  **                                                                             **
  208.  **        Pixmap Texture                                                         **
  209.  **            The TQ3StoragePixmap must contain a TQ3StorageObject that is a     **
  210.  **            Memory Storage ONLY for 1.0. We will support other storage          **
  211.  **            classes in later releases.                                         **
  212.  **                                                                             **
  213.  *****************************************************************************/
  214.  
  215. QD3D_EXPORT TQ3TextureObject Q3PixmapTexture_New(
  216.     const TQ3StoragePixmap    *pixmap);
  217.  
  218. QD3D_EXPORT TQ3Status Q3PixmapTexture_GetPixmap(
  219.     TQ3TextureObject        texture,
  220.     TQ3StoragePixmap        *pixmap);
  221.  
  222. QD3D_EXPORT TQ3Status Q3PixmapTexture_SetPixmap(
  223.     TQ3TextureObject        texture,
  224.     const TQ3StoragePixmap    *pixmap);
  225.  
  226.  
  227. /******************************************************************************
  228.  **                                                                             **
  229.  **        Mipmap Texture                                                         **
  230.  **                                                                             **
  231.  *****************************************************************************/
  232.  
  233. QD3D_EXPORT TQ3TextureObject Q3MipmapTexture_New(
  234.     const TQ3Mipmap            *mipmap);
  235.  
  236. QD3D_EXPORT TQ3Status Q3MipmapTexture_GetMipmap(
  237.     TQ3TextureObject        texture,
  238.     TQ3Mipmap                *mipmap);
  239.  
  240. QD3D_EXPORT TQ3Status Q3MipmapTexture_SetMipmap(
  241.     TQ3TextureObject        texture,
  242.     const TQ3Mipmap            *mipmap);
  243.  
  244.  
  245. #if defined(ESCHER_VER_15) && ESCHER_VER_15
  246.  
  247. /******************************************************************************
  248.  **                                                                             **
  249.  **        Whoa! {neigh!}                                                         **
  250.  **                                                                             **
  251.  *****************************************************************************/
  252.  
  253. #define kQ3NeighborhoodFlagImagePlane                    ((unsigned long)1 << 0)
  254. #define kQ3NeighborhoodFlagViewInfo                        ((unsigned long)1 << 1)
  255. #define kQ3NeighborhoodFlagLightInfo                    ((unsigned long)1 << 2)
  256. #define kQ3NeighborhoodFlagRenderer                        ((unsigned long)1 << 3)
  257.  
  258. #define kQ3NeighborhoodFlagAmbientCoefficient            ((unsigned long)1 << 4)
  259. #define kQ3NeighborhoodFlagDiffuseColor                    ((unsigned long)1 << 5)
  260. #define kQ3NeighborhoodFlagSpecularColor                ((unsigned long)1 << 6)
  261. #define kQ3NeighborhoodFlagSpecularControl                ((unsigned long)1 << 7)
  262. #define kQ3NeighborhoodFlagTransparencyColor            ((unsigned long)1 << 8)
  263. #define kQ3NeighborhoodFlagEmittedColor                    ((unsigned long)1 << 9)
  264.  
  265. #define kQ3NeighborhoodFlagDepth                        ((unsigned long)1 << 10)
  266.  
  267. #define kQ3NeighborhoodFlagSurfaceUV                    ((unsigned long)1 << 11)
  268. #define kQ3NeighborhoodFlagSurfaceLocation                ((unsigned long)1 << 12)
  269. #define kQ3NeighborhoodFlagSurfaceNormal                ((unsigned long)1 << 13)
  270. #define kQ3NeighborhoodFlagSurfaceTangent                ((unsigned long)1 << 14)
  271.  
  272. #define kQ3NeighborhoodFlagSurfaceFilterSize            ((unsigned long)1 << 15)    
  273. #define kQ3NeighborhoodFlagSurfaceProjectedPixelX        ((unsigned long)1 << 16)
  274. #define kQ3NeighborhoodFlagSurfaceProjectedPixelY        ((unsigned long)1 << 17)
  275.  
  276. #define kQ3NeighborhoodFlagSurfaceWorldFilterSize        ((unsigned long)1 << 18)    
  277. #define kQ3NeighborhoodFlagSurfaceWorldProjectedPixelX    ((unsigned long)1 << 19)
  278. #define kQ3NeighborhoodFlagSurfaceWorldProjectedPixelY    ((unsigned long)1 << 20)
  279.  
  280. #define kQ3NeighborhoodFlagShadingUV                    ((unsigned long)1 << 21)
  281. #define kQ3NeighborhoodFlagShadingNormal                ((unsigned long)1 << 22)
  282. #define kQ3NeighborhoodFlagShadingColor                    ((unsigned long)1 << 23)
  283. #define kQ3NeighborhoodFlagShadingScalar                ((unsigned long)1 << 24)
  284. #define kQ3NeighborhoodFlagShadingOpacity                ((unsigned long)1 << 25)
  285. #define kQ3NeighborhoodFlagShadingTrim                    ((unsigned long)1 << 26)
  286.  
  287. typedef struct TQ3ImageSubRegion {
  288.     unsigned long         north;
  289.     unsigned long        east;
  290.     
  291.     unsigned long         south;
  292.     unsigned long         west;
  293. } TQ3ImageSubRegion;
  294.  
  295. typedef struct TQ3ImagePlane {
  296.     /* pixel location */
  297.     unsigned long        imageX;
  298.     unsigned long        imageY;
  299.     
  300.     /* imageplane size */
  301.     unsigned long        imageSizeX;
  302.     unsigned long        imageSizeY;
  303.     
  304.     /* pixel location mapped to 0-1 */
  305.     TQ3Param2D            imageUV;
  306.  
  307.     /* valid sub-region of pixmap */    
  308.     TQ3ImageSubRegion    imageSubRegion;
  309.      
  310.     /* pixmap typically attached to drawcontext */
  311.     TQ3Pixmap            pixmap;
  312. } TQ3ImagePlane;
  313.  
  314. typedef struct TQ3ViewInfo {
  315.     TQ3CameraObject        camera;
  316.     TQ3Point3D            cameraLocation;
  317.     TQ3Vector3D            viewDirection;
  318. } TQ3ViewInfo;
  319.  
  320. typedef struct TQ3NeighborhoodPrivate *TQ3NeighborhoodObject;
  321.  
  322.  
  323. /******************************************************************************
  324.  **                                                                             **
  325.  **                            Neighborhood Functions                             **
  326.  **                                                                             **
  327.  *****************************************************************************/
  328.  
  329. QD3D_EXPORT TQ3NeighborhoodObject Q3Neighborhood_New(
  330.     void);
  331.     
  332. QD3D_EXPORT TQ3Status Q3Neighborhood_Dispose(
  333.     TQ3NeighborhoodObject    neigh);
  334.  
  335. QD3D_EXPORT TQ3Status Q3Neighborhood_Initialize(
  336.     TQ3NeighborhoodObject    neigh);
  337.  
  338. QD3D_EXPORT TQ3Status Q3Neighborhood_Validate(
  339.     TQ3NeighborhoodObject    neigh,
  340.     unsigned long            field);
  341.  
  342. QD3D_EXPORT TQ3Status Q3Neighborhood_InValidate(
  343.     TQ3NeighborhoodObject    neigh,
  344.     unsigned long            field);
  345.  
  346. QD3D_EXPORT TQ3Boolean Q3Neighborhood_IsValid(
  347.     TQ3NeighborhoodObject    neigh,
  348.     unsigned long            field);
  349.  
  350. QD3D_EXPORT unsigned long Q3Neighborhood_GetValidFlag(
  351.     TQ3NeighborhoodObject    neigh);
  352.  
  353.  
  354. /******************************************************************************
  355.  **                                                                             **
  356.  **                                Set Methods                                     **
  357.  **                                                                             **
  358.  *****************************************************************************/
  359.  
  360. QD3D_EXPORT TQ3Status Q3Neighborhood_SetImagePlane(
  361.     TQ3NeighborhoodObject    neigh,
  362.     const TQ3ImagePlane        *imagePlane);
  363.  
  364. QD3D_EXPORT TQ3Status Q3Neighborhood_SetViewInfo(
  365.     TQ3NeighborhoodObject    neigh,
  366.     const TQ3ViewInfo        *viewInfo);
  367.  
  368. QD3D_EXPORT TQ3Status Q3Neighborhood_SetLightGroup(
  369.     TQ3NeighborhoodObject    neigh,
  370.     TQ3GroupObject            lightGroup);
  371.  
  372. QD3D_EXPORT TQ3Status Q3Neighborhood_SetRenderer(
  373.     TQ3NeighborhoodObject    neigh,
  374.     TQ3RendererObject        renderer);
  375.  
  376. QD3D_EXPORT TQ3Status Q3Neighborhood_SetAmbientCoefficient(
  377.     TQ3NeighborhoodObject    neigh,
  378.     float                    ambientCoefficient);
  379.     
  380. QD3D_EXPORT TQ3Status Q3Neighborhood_SetDiffuseColor(
  381.     TQ3NeighborhoodObject    neigh,
  382.     const TQ3ColorRGB        *diffuseColor);
  383.  
  384. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSpecularColor(
  385.     TQ3NeighborhoodObject    neigh,
  386.     const TQ3ColorRGB        *specularColor);
  387.  
  388. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSpecularControl(
  389.     TQ3NeighborhoodObject    neigh,
  390.     float                    specularControl);
  391.  
  392. QD3D_EXPORT TQ3Status Q3Neighborhood_SetTransparencyColor(
  393.     TQ3NeighborhoodObject    neigh,
  394.     const TQ3ColorRGB         *transparencyColor);
  395.  
  396. QD3D_EXPORT TQ3Status Q3Neighborhood_SetEmittedColor(
  397.     TQ3NeighborhoodObject    neigh,
  398.     const TQ3ColorRGB        *emittedColor);
  399.  
  400. QD3D_EXPORT TQ3Status Q3Neighborhood_SetDepth(
  401.     TQ3NeighborhoodObject    neigh,
  402.     float                    depth);
  403.  
  404. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceUV(
  405.     TQ3NeighborhoodObject    neigh,
  406.     const TQ3Param2D        *surfaceUV);
  407.  
  408. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceLocation(
  409.     TQ3NeighborhoodObject    neigh,
  410.     const TQ3Point3D        *surfaceLocation);
  411.  
  412. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceNormal(
  413.     TQ3NeighborhoodObject    neigh,
  414.     const TQ3Vector3D         *surfaceNormal);
  415.  
  416. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceTangent(
  417.     TQ3NeighborhoodObject    neigh,
  418.     const TQ3Tangent2D        *surfaceTangent);
  419.  
  420. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceFilterSize(
  421.     TQ3NeighborhoodObject    neigh,
  422.     float                    surfaceFilterSize);
  423.  
  424. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceProjectedPixelX(
  425.     TQ3NeighborhoodObject    neigh,
  426.     const TQ3Vector2D        *surfaceProjectedPixelX);
  427.  
  428. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceProjectedPixelY(
  429.     TQ3NeighborhoodObject    neigh,
  430.     const TQ3Vector2D        *surfaceProjectedPixelY);
  431.  
  432. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceWorldFilterSize(
  433.     TQ3NeighborhoodObject    neigh,
  434.     float                    surfaceWorldFilterSize);
  435.  
  436. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceWorldProjectedPixelX(
  437.     TQ3NeighborhoodObject    neigh,
  438.     const TQ3Vector3D        *surfaceWorldProjectedPixelX);
  439.  
  440. QD3D_EXPORT TQ3Status Q3Neighborhood_SetSurfaceWorldProjectedPixelY(
  441.     TQ3NeighborhoodObject    neigh,
  442.     const TQ3Vector3D        *surfaceWorldProjectedPixelY);
  443.  
  444. QD3D_EXPORT TQ3Status Q3Neighborhood_SetShadingUV(
  445.     TQ3NeighborhoodObject    neigh,
  446.     const TQ3Param2D        *shadingUV);
  447.  
  448. QD3D_EXPORT TQ3Status Q3Neighborhood_SetShadingNormal(
  449.     TQ3NeighborhoodObject    neigh,
  450.     const TQ3Vector3D        *shadingNormal);
  451.  
  452. QD3D_EXPORT TQ3Status Q3Neighborhood_SetShadingColor(
  453.     TQ3NeighborhoodObject    neigh,
  454.     const TQ3ColorRGB        *shadingColor);
  455.  
  456. QD3D_EXPORT TQ3Status Q3Neighborhood_SetShadingScalar(
  457.     TQ3NeighborhoodObject    neigh,
  458.     float                    shadingScalar);
  459.  
  460. QD3D_EXPORT TQ3Status Q3Neighborhood_SetShadingOpacity(
  461.     TQ3NeighborhoodObject    neigh,
  462.     float                    shadingOpacity);
  463.  
  464. QD3D_EXPORT TQ3Status Q3Neighborhood_SetShadingTrim(
  465.     TQ3NeighborhoodObject    neigh,
  466.     TQ3Boolean                shadingTrim);
  467.  
  468.  
  469. /******************************************************************************
  470.  **                                                                             **
  471.  **                                Get Methods                                     **
  472.  **                                                                             **
  473.  *****************************************************************************/
  474.  
  475. QD3D_EXPORT TQ3ImagePlane *Q3Neighborhood_GetImagePlane(
  476.     TQ3NeighborhoodObject    neigh);
  477.  
  478. QD3D_EXPORT TQ3ViewInfo *Q3Neighborhood_GetViewInfo(
  479.     TQ3NeighborhoodObject    neigh);
  480.  
  481. QD3D_EXPORT TQ3GroupObject Q3Neighborhood_GetLightGroup(
  482.     TQ3NeighborhoodObject    neigh);
  483.  
  484. QD3D_EXPORT TQ3RendererObject Q3Neighborhood_GetRenderer(
  485.     TQ3NeighborhoodObject    neigh);
  486.  
  487. QD3D_EXPORT float Q3Neighborhood_GetAmbientCoefficient(
  488.     TQ3NeighborhoodObject    neigh);
  489.     
  490. QD3D_EXPORT TQ3ColorRGB *Q3Neighborhood_GetDiffuseColor(
  491.     TQ3NeighborhoodObject    neigh);
  492.  
  493. QD3D_EXPORT TQ3ColorRGB *Q3Neighborhood_GetSpecularColor(
  494.     TQ3NeighborhoodObject    neigh);
  495.  
  496. QD3D_EXPORT float Q3Neighborhood_GetSpecularControl(
  497.     TQ3NeighborhoodObject    neigh);
  498.  
  499. QD3D_EXPORT TQ3ColorRGB *Q3Neighborhood_GetTransparencyColor(
  500.     TQ3NeighborhoodObject    neigh);
  501.  
  502. QD3D_EXPORT TQ3ColorRGB *Q3Neighborhood_GetEmittedColor(
  503.     TQ3NeighborhoodObject    neigh);
  504.  
  505. QD3D_EXPORT float Q3Neighborhood_GetDepth(
  506.     TQ3NeighborhoodObject    neigh);
  507.  
  508. QD3D_EXPORT TQ3Param2D *Q3Neighborhood_GetSurfaceUV(
  509.     TQ3NeighborhoodObject    neigh);
  510.  
  511. QD3D_EXPORT TQ3Point3D *Q3Neighborhood_GetSurfaceLocation(
  512.     TQ3NeighborhoodObject    neigh);
  513.  
  514. QD3D_EXPORT TQ3Vector3D *Q3Neighborhood_GetSurfaceNormal(
  515.     TQ3NeighborhoodObject    neigh);
  516.  
  517. QD3D_EXPORT TQ3Tangent2D *Q3Neighborhood_GetSurfaceTangent(
  518.     TQ3NeighborhoodObject    neigh);
  519.  
  520. QD3D_EXPORT float Q3Neighborhood_GetSurfaceFilterSize(
  521.     TQ3NeighborhoodObject    neigh);
  522.  
  523. QD3D_EXPORT TQ3Vector2D *Q3Neighborhood_GetSurfaceProjectedPixelX(
  524.     TQ3NeighborhoodObject    neigh);
  525.  
  526. QD3D_EXPORT TQ3Vector2D *Q3Neighborhood_GetSurfaceProjectedPixelY(
  527.     TQ3NeighborhoodObject    neigh);
  528.  
  529. QD3D_EXPORT float Q3Neighborhood_GetSurfaceWorldFilterSize(
  530.     TQ3NeighborhoodObject    neigh);
  531.  
  532. QD3D_EXPORT TQ3Vector3D *Q3Neighborhood_GetSurfaceWorldProjectedPixelX(
  533.     TQ3NeighborhoodObject    neigh);
  534.  
  535. QD3D_EXPORT TQ3Vector3D *Q3Neighborhood_GetSurfaceWorldProjectedPixelY(
  536.     TQ3NeighborhoodObject    neigh);
  537.  
  538. QD3D_EXPORT TQ3Param2D *Q3Neighborhood_GetShadingUV(
  539.     TQ3NeighborhoodObject    neigh);
  540.  
  541. QD3D_EXPORT TQ3Vector3D *Q3Neighborhood_GetShadingNormal(
  542.     TQ3NeighborhoodObject    neigh);
  543.  
  544. QD3D_EXPORT TQ3ColorRGB *Q3Neighborhood_GetShadingColor(
  545.     TQ3NeighborhoodObject    neigh);
  546.  
  547. QD3D_EXPORT float Q3Neighborhood_GetShadingScalar(
  548.     TQ3NeighborhoodObject    neigh);
  549.  
  550. QD3D_EXPORT float Q3Neighborhood_GetShadingOpacity(
  551.     TQ3NeighborhoodObject    neigh);
  552.  
  553. QD3D_EXPORT TQ3Boolean Q3Neighborhood_GetShadingTrim(
  554.     TQ3NeighborhoodObject    neigh);
  555.     
  556.     
  557. /******************************************************************************
  558.  **                                                                             **
  559.  **                            Enum Definitions                                 **
  560.  **                                                                             **
  561.  *****************************************************************************/
  562.  
  563. typedef enum TQ3ShaderEffect {
  564.     kQ3ShaderEffectReplace,
  565.     kQ3ShaderEffectDarken,
  566.     kQ3ShaderEffectLighten,
  567.     kQ3ShaderEffectMultiply
  568. } TQ3ShaderEffect;
  569.  
  570. /******************************************************************************
  571.  **                                                                             **
  572.  **                                Shader methods                                 **
  573.  **                                                                             **
  574.  *****************************************************************************/
  575.  
  576. QD3D_EXPORT TQ3Status Q3Shader_Evaluate(
  577.     TQ3ShaderObject            shader, 
  578.     TQ3NeighborhoodObject    neigh);
  579.  
  580. /******************************************************************************
  581.  **                                                                             **
  582.  **                            Class managment methods                             **
  583.  **                                                                             **
  584.  *****************************************************************************/
  585.  
  586. /******************************************************************************
  587.  **                                                                             **
  588.  **                            Atmospheric Shader                                 **
  589.  **                                                                             **
  590.  *****************************************************************************/
  591.  
  592. QD3D_EXPORT TQ3ShaderObject Q3AtmosphericShader_New(
  593.     void);
  594.     
  595. QD3D_EXPORT TQ3Status Q3AtmosphericShader_GetExtinctionCoefficient(
  596.     TQ3ShaderObject            shader,
  597.     float                    *extinctionCoefficient);
  598.  
  599. QD3D_EXPORT TQ3Status Q3AtmosphericShader_GetAtmosphereColor(
  600.     TQ3ShaderObject            shader,
  601.     TQ3ColorRGB                *atmosphereColor);
  602.  
  603. QD3D_EXPORT TQ3Status Q3AtmosphericShader_SetExtinctionCoefficient(
  604.     TQ3ShaderObject            shader,
  605.     float                    extinctionCoefficient);
  606.  
  607. QD3D_EXPORT TQ3Status Q3AtmosphericShader_SetAtmosphereColor(
  608.     TQ3ShaderObject            shader,
  609.     const TQ3ColorRGB        *atmosphereColor);
  610.  
  611.  
  612. /******************************************************************************
  613.  **                                                                             **
  614.  **                        Base Class Illumination Shader                         **
  615.  **                                                                             **
  616.  *****************************************************************************/
  617.  
  618. QD3D_EXPORT TQ3Status  Q3IlluminationShader_SetLightGroup(
  619.     TQ3ShaderObject                shader,
  620.     TQ3GroupObject                lightGroup);
  621.  
  622. QD3D_EXPORT TQ3Status Q3IlluminationShader_GetLightGroup(
  623.     TQ3ShaderObject                shader,
  624.     TQ3GroupObject                *lightGroup);
  625.  
  626.  
  627. /******************************************************************************
  628.  **                                                                             **
  629.  **                                Image Shader                                 **
  630.  **                                                                             **
  631.  *****************************************************************************/
  632.  
  633. #define    kQ3ImageShaderForeground    ((unsigned long)1 << 1)
  634. #define    kQ3ImageShaderBackground    ((unsigned long)1 << 2)
  635.  
  636. QD3D_EXPORT TQ3ShaderObject Q3ImageShader_New(
  637.     unsigned long                 kind);
  638.  
  639. QD3D_EXPORT TQ3Status Q3ImageShader_GetSourceShader(
  640.     TQ3ShaderObject                shader,
  641.     TQ3ShaderObject                *sourceShader);
  642.  
  643. QD3D_EXPORT TQ3Status Q3ImageShader_SetSourceShader(
  644.     TQ3ShaderObject                shader,
  645.     const TQ3ShaderObject        sourceShader);
  646.  
  647.  
  648. /******************************************************************************
  649.  **                                                                             **
  650.  **                                Trim Shader                                     **
  651.  **                                                                             **
  652.  *****************************************************************************/
  653.  
  654. QD3D_EXPORT TQ3ShaderObject Q3TrimShader_New(
  655.     void);
  656.  
  657. QD3D_EXPORT TQ3Status Q3TrimShader_GetThreshold(
  658.     TQ3ShaderObject            shader,
  659.     float                    *threshold);
  660.     
  661. QD3D_EXPORT TQ3Status Q3TrimShader_GetTrimmer(
  662.     TQ3ShaderObject            shader,
  663.     TQ3ShaderObject            *trimmer);
  664.  
  665. QD3D_EXPORT TQ3Status Q3TrimShader_SetThreshold(
  666.     TQ3ShaderObject            shader,
  667.     float                    threshold);
  668.  
  669. QD3D_EXPORT TQ3Status Q3TrimShader_SetTrimmer(
  670.     TQ3ShaderObject            shader,
  671.     TQ3ShaderObject            trimmer);
  672.  
  673. /******************************************************************************
  674.  **                                                                             **
  675.  **                            Attachment Objects                                 **
  676.  **                                                                             **
  677.  *****************************************************************************/
  678.  
  679. TQ3Status Q3Attachment_Evaluate(
  680.     TQ3AttachmentObject            attachment, 
  681.     TQ3NeighborhoodObject        neigh);
  682.  
  683. TQ3Status Q3Attachment_SetBoundingSphere(
  684.     TQ3AttachmentObject            attachment,
  685.     const TQ3BoundingSphere        *boundingSphere);
  686.  
  687. TQ3Status Q3Attachment_GetBoundingSphere(
  688.     TQ3AttachmentObject            attachment,
  689.     TQ3BoundingSphere            *boundingSphere);
  690.  
  691. TQ3Status Q3Attachment_SetAttachmentTransform(
  692.     TQ3AttachmentObject            attachment,
  693.     const TQ3Matrix4x4            *attachmentTransform);
  694.  
  695. TQ3Status Q3Attachment_GetAttachmentTransform(
  696.     TQ3AttachmentObject            attachment,
  697.     TQ3Matrix4x4                *attachmentTransform);
  698.  
  699.  
  700. #endif /* ESCHER_VER_15 */
  701.  
  702. #ifdef __cplusplus
  703. }
  704. #endif    /* __cplusplus */
  705.  
  706. #if defined(__MWERKS__)
  707.     #pragma enumsalwaysint reset
  708. #elif defined(__xlc) || defined(__xlC) || defined(__xlC__) || defined(__XLC121__)
  709.     #pragma options enum=reset
  710. #endif
  711.  
  712. #endif  /*  QD3DShader_h  */
  713.